package com.corgi.mybatis.modules.service;

import com.corgi.mybatis.modules.dto.PeopleDto;
import com.corgi.mybatis.modules.mapper.PeopleMapper;
import com.corgi.mybatis.modules.mapping.PeopleMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @title: PeopleService
 * @description:
 * @author: dengmiao
 * @create: 2019-10-23 17:31
 **/
@Service
public class PeopleService {

    @Autowired
    private PeopleMapper peopleMapper;

    @Autowired
    private PeopleMapping peopleMapping;

    public List<PeopleDto> findList() {
        return peopleMapping.fromList(peopleMapper.selectList());
    }
}
